package Chapter5;

/**
 * 声明TripleComparator比较器类如下，实现比较器接口，提供三元组按值比较大小的compare()方法
 */
public class TripleComparator implements java.util.Comparator<Triple> {
    @Override
    public int compare(Triple triple1, Triple triple2) {
        return (int) (triple1.value - triple2.value);
    }
}
